<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:body>

	<ui:composition template="masterpage-acesso.xhtml">
		<ui:define name="contLogin">
			<div class="content">
				<h4 class="title">Cadastre-se</h4>

				<div class="form-group">
					<h:outputLabel id="outNome" value="Nome" />
					<h:inputText id="iptNewNome" styleClass="form-control"
						required="true" value="#{novoUsuarioBean.usuario.nome}"
						maxlength="25" />
					<p:watermark value="Digite seu nome" for="iptNewNome" />
					<h:message for="iptNewNome" class="mensagens" />
				</div>

				<div class="form-group">
					<h:outputLabel id="outEmail" value="Email" />
					<h:inputText id="iptNewEmail" styleClass="form-control"
						required="true" value="#{novoUsuarioBean.usuario.email}"
						maxlength="45" validatorMessage="#{bundle['email.invalido']}">
						<f:validateRegex
							pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />
					</h:inputText>

					<p:watermark value="Digite seu email" for="iptNewEmail" />
					<h:message for="iptNewEmail" class="mensagens" />
				</div>

				<div class="form-group">
					<h:outputLabel id="outLogin" value="Login" />
					<h:inputText id="iptNewLogin" styleClass="form-control"
						required="true" value="#{novoUsuarioBean.usuario.username}"
						maxlength="25" />
					<p:watermark value="Digite seu login" for="iptNewLogin" />
					<h:message for="iptNewLogin" class="mensagens" />
				</div>

				<div class="form-group">
					<h:outputLabel id="outSenha" value="Senha" />
					<h:inputSecret id="iptNewSenha" styleClass="form-control"
						required="true" value="#{novoUsuarioBean.usuario.senha}"
						maxlength="8" />
					<p:watermark value="Digite sua senha" for="iptNewSenha" />
					<h:message for="iptNewSenha" class="mensagens" />
				</div>

				<div class="form-group">
					<h:outputLabel id="outConfSenha" value="Confirmar Senha" />
					<h:inputSecret id="iptConfsenha" styleClass="form-control"
						required="true" value="#{novoUsuarioBean.novaSenha}"
						maxlength="8" />
					<p:watermark value="Confirme sua senha" for="iptConfsenha" />
					<h:message for="iptConfsenha" class="mensagens" />
				</div>
				<br />

				<h:commandButton id="btnCadastrar" styleClass="btn btn-primary"
					type="submit" value="Cadastrar"
					action="#{novoUsuarioBean.cadastrar}" />
				<h:commandButton id="btnCancelar" styleClass="btn btn-default"
					type="submit" action="#{novoUsuarioBean.cancelarCadastro}"
					immediate="true" value="Voltar" />
			</div>

		</ui:define>


	</ui:composition>





</h:body>
</html>